package com.quanyan.stadium.biz.redis;

import com.quanyan.stadium.entity.vo.GameSchedule;
import com.quanyan.stadium.entity.vo.PKEventVo;

import java.util.Map;
import java.util.Set;

/**
 * Created by lei.w on 2016/7/15.
 */
public interface UserGameScheduleCacheDao {

    /**
     * 放置用户比赛记录Set
     *
     *  type 0:pk, 1:game
     * @param map
     */
    void putUserGameRecordSet(Integer uid, Map<byte[], Double> map);

    /**
     * 获取用户比赛记录区间
     *
     * @param uid
     * @param min
     * @param max
     * @return
     */
    Set<byte[]> queryUserGameRecordSetInterval(Integer uid, Integer min, Integer max);

    /**
     * 清空用户比赛记录,在评价的时候
     *
     * @param uid
     *
     * @return
     */
    void delUserGameRecordSetInterval(Integer uid);

    /**
     * 放置用户PK记录
     * @param pkEventVo
     */
    void putPkRecord(PKEventVo pkEventVo);

    /**
     * 获取用户PK记录
     * @param pkid
     * @return
     */
    PKEventVo getUserPkRecord(Integer pkid);

    /**
     * 放置用户赛事赛程
     * @param gameSchedule
     */
    void putUserGameSchedule(GameSchedule gameSchedule);

    /**
     * 获取用户赛事赛程
     * @param id
     * @return
     */
    GameSchedule getUserGameSchedule(Integer id);

    /**
     * 用户积分标示
     * @param uid
     * @return
     */
    boolean isUserPkScoreEntryFlag(Integer uid);

    /**
     * 设置用户积分录入标示
     * @param uid
     */
    void setUserPkScoreEntryFlag(Integer uid);
}
